<?php #//v.3.3.0
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('./includes/config.inc.php');

include "includes/general_info.inc.php";

     $query_settings = "select * from PHPAUCTIONXL_proxybid_settings where id='1'";
                             $query_settings2 =  mysql_query ($query_settings);
                                $activatedcheck = mysql_result($query_settings2,0,"activated");


         $id2222 = $_SESSION["PHPAUCTION_LOGGED_IN"];
                 $query343454566 = mysql_fetch_array(mysql_query("SELECT * FROM PHPAUCTIONXL_version_1_3 WHERE id=1"));
  
   $pause_auctions_start1 = $query343454566['pause_auctions_start'];
   $pause_auctions_end1 = $query343454566['pause_auctions_end'];
   
    $email_confirmation_activated1 = $query343454566['email_confirmation_activated'];
    $daily_win_limits1 = $query343454566['daily_win_limits'];
    $weekly_win_limits1 = $query343454566['weekly_win_limits'];
    $monthly_win_limits1 = $query343454566['monthly_win_limits'];
    $free_bids_at_sign_up1 = $query343454566['free_bids_at_sign_up'];
    $live_auction_note1 = $query343454566['live_auction_note'];
    $upcoming_auction_note1 = $query343454566['upcoming_auction_note'];
    $closing_auction_note1 = $query343454566['closing_auction_note'];
    $header_announcement1 = $query343454566['header_announcement'];
    $homepage_announcement1 = $query343454566['homepage_announcement'];
    $live_auction_announcement1 = $query343454566['live_auction_announcement'];
    $google_analytics1 = $query343454566['google_analytics'];
    $footer_app1 = $query343454566['footer_app'];
    $payment_gateway1 = $query343454566['payment_gateway'];
    $youtube_url1 = $query343454566['youtube_url'];
    $twitter_url1 = $query343454566['twitter_url'];
    $facebook_url1 = $query343454566['facebook_url'];
    $welcome_message1 = $query343454566['welcome_message'];

   
             // echo $pause_auctions_start1; 
             //  echo $pause_auctions_end1;


$TIME = mktime(date("H")+$SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"));

$NOW = date("YmdHis",$TIME);

      $pausestarthour = $pause_auctions_start1;  // Set To 24 For Always Running
$pauseendhour = $pause_auctions_end1;   // Set To 24 For Always Running
$currenthour = substr($NOW, 8, 2);

$paused = 0;

if ( $pausestarthour <= $currenthour && $pauseendhour >= $currenthour ) {


$paused = 1;
    

}

if ( $pausestarthour == 0 && $pauseendhour == 0 ) {


$paused = 0;
    

}



$jsenddate .= substr ($NOW, 4, 2);
$jsenddate .= "/";
$jsenddate .= substr ($NOW, 6, 2);
$jsenddate .= "/";
$jsenddate .= substr ($NOW, 0, 4);
$jsenddate .= " ";
/*
if (substr ($NOW, 8, 2) != 0 ) {
if (substr ($NOW, 8, 2) > 12) {
if ((substr ($NOW, 8, 2)-12) < 10) {


$jsenddate .= 0;
         }
            }
            }
            */
            
if (substr ($NOW, 8, 2) > 12) {
$jsenddate .= substr ($NOW, 8, 2)-12;
$jsampm = "PM";
}
if (substr ($NOW, 8, 2) != 0){
if (substr ($NOW, 8, 2) < 12) {
$jsenddate .= substr ($NOW, 8, 2);
$jsampm = "AM";
}}
if (substr ($NOW, 8, 2) == 12) {
$jsenddate .= substr ($NOW, 8, 2);
$jsampm = "PM";
}
if (substr ($NOW, 8, 2) == 0) {
$jsenddate .= 12;
$jsampm = "AM";
}


$jsenddate .= ":";
$jsenddate .= substr ($NOW, 10, 2);
$jsenddate .= ":";
$jsenddate .= substr ($NOW, 12, 2);
$jsenddate .= " ";
$jsenddate .= $jsampm;

$NOW2 = $jsenddate;





$header_data_stream_javascript_live_auctions = "


function get_auction()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");
  }
else
  {
  alert(\"Your browser does not support XMLHTTP!\");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
   //alert('state = 4');
var x3=xmlhttp.responseText;
      //alert(xmlhttp.responseText);
                       
// var x=Get_Auction( \"auction_data\" );
  
var x2=x3.split(\"|\");
  
currentservertime=x2[0];";
    
// currenttime = new Date(x2[0]);

// its working";

//echo $header_data_stream_javascript; 

 /* get ending soon auctions */
$live_start_limit = ( $live_page - 1 ) * $SETTINGS['endingsoonnumber'];
$live_stop_limit = $SETTINGS['endingsoonnumber'];


 /* get ending soon auctions */
$query = "select reserve_price,ends,id,title,current_high_bidder,current_bid,pict_url,ends2 from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends2 LIMIT ".$live_start_limit.",".$live_stop_limit;
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);

$i=0;
$ii=(( $live_page - 1 ) * (12 * $SETTINGS['endingsoonnumber'] ));

$live_auction_data_stream_javascript = "";
while($i < $num_auction) {
    $reserve 	= mysql_result($result,$i,"reserve_price"); 
        $reserve 	= mysql_result($result,$i,"reserve_price");
              
    srand ((double) microtime( )*1000000); 
$randomly_select_reserve = rand(40, 70 );
         $randomly_select_reserve2 = $randomly_select_reserve * .01;
    $reserve = $reserve * $randomly_select_reserve2;
      $reserve = round($reserve, 2);
 $reserve = number_format($reserve, 2);        
$i++;
$ii++;
        
//$live_auction_data_stream_javascript .= "

////sold$i = document.getElementById('countdown$i').innerHTML; 
 // if ( sold$i != '<font color=\"red\">SOLD!</font>' ) {
     //alert(sold1);
//    if ( sold$i != '<font color=\"red\">Reserve Not Met</font>' ) {
     //alert(sold1); ";  

$live_auction_data_stream_javascript .= "\r //ACTIVE AUCTION DATA #$i \r";
$live_auction_data_stream_javascript .= "//vvvvvvvvvvvvvvvv \r";


$live_auction_data_stream_javascript .= "currenttime$i$i$i=new Date('$NOW2');";
$live_auction_data_stream_javascript .= "reserve_price$i$i$i$i$i=$reserve;";
$live_auction_data_stream_javascript .= "currenttime$i$i$i$i$i=new Date(currentservertime);";
             //$live_auction_data_stream_javascript .= "alert(currenttime$i$i$i);";
$live_auction_data_stream_javascript .= "id$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "open$i=x2[$ii]; ";
$ii++;
$live_auction_data_stream_javascript .= "ends$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "title$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "high_bidder$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "high_bid$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "picture_url$i=x2[$ii]; ";
$ii++;
$live_auction_data_stream_javascript .= "rretail$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "ppromotion_icon$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "notimer$i=x2[$ii];";
$ii++;
$live_auction_data_stream_javascript .= "seat_qty$i=x2[$ii];";
//$live_auction_data_stream_javascript .= "alert(seat_qty$i);";
$ii++;
$live_auction_data_stream_javascript .= "seat_taken$i=x2[$ii];";  
//$live_auction_data_stream_javascript .= "alert(seat_taken$i);";
//$live_auction_data_stream_javascript .= "alert(ppromotion_icon$i);";
//
//$live_auction_data_stream_javascript .= "CountdownTimer$i();\r";
        //  $live_auction_data_stream_javascript .= "}";     
//$live_auction_data_stream_javascript .= "}";    
}


               

 $bottom_data_stream_javascript_live_auctions = "          


  }
}
ajaxurl = \"cronfiles/get_time2.txt\";

xmlhttp.open(\"GET\",ajaxurl,true);
xmlhttp.setRequestHeader( \"If-Modified-Since\", \"Sat, 1 Jan 2000 00:00:00 GMT\" );
xmlhttp.send(null);


setTimeout(\"get_auction()\", 1000);

  


}

setTimeout(\"get_auction()\", 200);
  
 ";



 $header_data_stream_javascript_upcoming_auctions = "

function get_auction22()
{
var xmlhttp;
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  // code for IE6, IE5
  xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");
  }
else
  {
  alert(\"Your browser does not support XMLHTTP!\");
  }
xmlhttp.onreadystatechange=function()
{
if(xmlhttp.readyState==4)
  {
   //alert('state = 4');
var x33=xmlhttp.responseText;
      //alert(xmlhttp.responseText);
                       
// var x=Get_Auction( \"auction_data\" );
  
var x22=x33.split(\"|\");
  
currentservertime=x22[0];";


$upcoming_start_limit = ( $upcoming_page - 1 ) * $SETTINGS['lastitemsnumber'];
$upcoming_stop_limit = $SETTINGS['lastitemsnumber'];

$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts ASC
         LIMIT ".$upcoming_start_limit.",".$upcoming_stop_limit;
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);

$iii=0;
$ii = (( $upcoming_page - 1 ) * (6 * $SETTINGS['lastitemsnumber'] ));;
$i=0;
$upcoming_auction_data_stream_javascript = "";
while($iii < $num_auction1) {
           

$i++;


$ii++;
$upcoming_auction_data_stream_javascript .= "//HOLDING AUCTION DATA #$i \r";
$upcoming_auction_data_stream_javascript .= "//vvvvvvvvvvvvvvvv \r";
$upcoming_auction_data_stream_javascript .= "holdingcurrenttime$i$i$i$i = new Date('$NOW2');";
 //$upcoming_auction_data_stream_javascript .= "alert(currenttime$i$i$i$i);";
 $upcoming_auction_data_stream_javascript .= "holdingopen$i$i = x22[$ii];\r";
 $ii++;
$upcoming_auction_data_stream_javascript .= "holdingstarts$i$i = x22[$ii];";
$ii++;
$upcoming_auction_data_stream_javascript .= "holdingtitle$i$i = x22[$ii];";
$ii++;
$upcoming_auction_data_stream_javascript .= "holdingid$i$i = x22[$ii];";
$ii++;
$upcoming_auction_data_stream_javascript .= "holdingpicture_url$i$i = x22[$ii];"; 
                                                 
 $ii++;
 $upcoming_auction_data_stream_javascript .= "holdingrretail$i$i = x22[$ii];\r";
 

//$upcoming_auction_data_stream_javascript .= "CountdownTimer$i();\r";
$iii++;
               
}



//echo $live_auction_data_stream_javascript; 
//echo $upcoming_auction_data_stream_javascript; 


           

 $bottom_data_stream_javascript_upcoming_auctions = "          


  }
}
ajaxurl22 = \"cronfiles/get_time3.txt\";

xmlhttp.open(\"GET\",ajaxurl22,true);
xmlhttp.setRequestHeader( \"If-Modified-Since\", \"Sat, 1 Jan 2000 00:00:00 GMT\" );
xmlhttp.send(null);


setTimeout(\"get_auction22()\", 10000);

  


}

setTimeout(\"get_auction22()\", 200);
  
 ";

  
//echo $bottom_data_stream_javascript;
  


                    
$i=0;
$ii=0;
$sa = "";
while($i < $num_auction) {
           
$i++;
$ii++;
$iii=3;

$high_bid_set_to_x .= "high_bid$i$i$iii = 'x'; ";



}
  $high_bid_set_to_x .= "\r\r";

//echo $high_bid_set_to_x; 



$i=0;
$ii=0;

$live_auction_countdown_timer_javascript = "";
while($i < $num_auction) {

$ii++;
  
$live_auction_countdown_timer_javascript .= "timecount$ii = 6;";

if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
$live_auction_countdown_timer_javascript .= "buttoncount$ii = 6;";
                   }
$live_auction_countdown_timer_javascript .= "function CountdownTimer$ii(currenttime$ii,timecount$ii$ii";

if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
$live_auction_countdown_timer_javascript .= ",buttoncount$ii$ii";
           }

$live_auction_countdown_timer_javascript .= ") {";


//$live_auction_countdown_timer_javascript .= "currenttime$ii = new Date(currenttime$ii);";

//$live_auction_countdown_timer_javascript .= "alert(currenttime1);";



$live_auction_countdown_timer_javascript .= "secondsnow$ii = currenttime$ii.getSeconds();";

//$live_auction_countdown_timer_javascript .= "alert(secondsnow);";

$live_auction_countdown_timer_javascript .= "currenttime$ii$ii = currenttime$ii;";

$live_auction_countdown_timer_javascript .= "secondslater$ii = secondsnow$ii + 1;";

//$live_auction_countdown_timer_javascript .= "alert(secondslater);";

$live_auction_countdown_timer_javascript .= "currenttime$ii$ii.setSeconds(secondslater$ii);";

//$live_auction_countdown_timer_javascript .= "alert(currenttime2);";




$live_auction_countdown_timer_javascript .= " var dthen = new Date(ends$ii);"; 
$live_auction_countdown_timer_javascript .= " var dnow = currenttime$ii$ii; ";
//$live_auction_countdown_timer_javascript .= "alert(dthen);";
//$live_auction_countdown_timer_javascript .= "alert(dnow);";
$live_auction_countdown_timer_javascript .= " ddiff = new Date(dthen-dnow);"; 
$live_auction_countdown_timer_javascript .= " gsecs = Math.floor(ddiff.valueOf()/1000); ";
$live_auction_countdown_timer_javascript .= "timecount$ii$ii$ii = ++timecount$ii$ii;
          if ( gsecs > 8) { // alert(timecount$ii$ii$ii);
            if ( timecount$ii$ii$ii > 15 ) {
            
                   timecount$ii$ii$ii = 0;
                   currenttime$ii$ii = currenttime$ii$ii$ii$ii$ii;
                              
            }
          }   ";    
$live_auction_countdown_timer_javascript .= "if(high_bid$ii$ii$iii == 'x') {";


$live_auction_countdown_timer_javascript .= "high_bid$ii$ii$iii = high_bid$ii;";

 $live_auction_countdown_timer_javascript .= "}";


$live_auction_countdown_timer_javascript .= "if(high_bid$ii$ii$iii < high_bid$ii) {";


   
   //$live_auction_countdown_timer_javascript .= "  document.getElementById('bid$ii').innerHTML = \"\"+ high_bid$ii +\"\";"; 
     
     
     
     
$live_auction_countdown_timer_javascript .= "      (new Spry.Effect.Highlight(document.getElementById('highbid$ii'), {from:'#EF0000', to:'#FFFFFF', restoreColor: '#FFFFFF'})).start();      ";
  
                    $live_auction_countdown_timer_javascript .= "high_bid$ii$ii$iii = high_bid$ii;";


$live_auction_countdown_timer_javascript .= "}";
                       
       //                $live_auction_countdown_timer_javascript .= "  document.getElementById('bid$ii$ii').innerHTML = \"\"+ high_bid$ii$ii +\"\";"; ; 
 
 $live_auction_countdown_timer_javascript .= "if(high_bid$ii != undefined) {";
                                                                               
 $live_auction_countdown_timer_javascript .= "  document.getElementById('retail$ii').innerHTML = \"$RETAIL_PRICE: $currency_symbol\"+ rretail$ii +\"\";";    
     
$live_auction_countdown_timer_javascript .= "  document.getElementById('highbid$ii').innerHTML = \"$currency_symbol\"+ high_bid$ii +\"\";";   

$live_auction_countdown_timer_javascript .= "  document.getElementById('highbidder$ii').innerHTML = \"\"+ high_bidder$ii +\"\";";

$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii').innerHTML=\"\" + title$ii +\"\";";

$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii').href=\"item.php?id=\" + id$ii + \"\";";

$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii$ii$iii').href=\"item.php?id=\" + id$ii + \"\";";

//$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii$ii$ii').href=\"item.php?id=\" + id$ii + \"\";";

$live_auction_countdown_timer_javascript .= "document['item_pic$ii$iii'].src =\"uploaded/\" + picture_url$ii + \"\";";

$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii').href=\"item.php?id=\" + id$ii + \"\";";

$live_auction_countdown_timer_javascript .= "document.getElementById('buttonitemid$ii').innerHTML=\"\" + id$ii + \"\";";
//$live_auction_countdown_timer_javascript .= "document['soldaa$ii'].src =\"images/sold_invisible_small.gif\";";

$live_auction_countdown_timer_javascript .= "}";

$live_auction_countdown_timer_javascript .= "if(gsecs < -3) {";

$live_auction_countdown_timer_javascript .= "document['itembidbutton$ii'].src =\"images/bidbutton3$USERLANG.jpg\";";

$live_auction_countdown_timer_javascript .= "}";

$live_auction_countdown_timer_javascript .= "if(gsecs > 10) {";

$live_auction_countdown_timer_javascript .= "document['itembidbutton$ii'].src =\"images/bidbutton1$USERLANG.jpg\";";

$live_auction_countdown_timer_javascript .= "}";



if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
     	        
$live_auction_countdown_timer_javascript .= "if(buttoncount$ii$ii == 6) {";
 
$live_auction_countdown_timer_javascript .= "xiibb$ii=document.getElementById('iibb$ii').onclick;";

$live_auction_countdown_timer_javascript .= "buttoncount$ii$ii$ii = 0;";

$live_auction_countdown_timer_javascript .= "}"; 
                               
$live_auction_countdown_timer_javascript .= "if( gsecs < 6 ) {";

$live_auction_countdown_timer_javascript .= "document.getElementById('iibb$ii').onclick=\" \";";

$live_auction_countdown_timer_javascript .= "}";

$live_auction_countdown_timer_javascript .= "if( gsecs > 8 ) {";

$live_auction_countdown_timer_javascript .= "document.getElementById('iibb$ii').onclick=xiibb$ii;";

$live_auction_countdown_timer_javascript .= "}";

$live_auction_countdown_timer_javascript .= "if(gsecs < -20) {";

$live_auction_countdown_timer_javascript .= "if(gsecs > -30 ) {";

$live_auction_countdown_timer_javascript .= "cron();";

$live_auction_countdown_timer_javascript .= "}}";

     $live_auction_countdown_timer_javascript .= "if(gsecs == -61 ) {";

$live_auction_countdown_timer_javascript .= "location.reload(true);";

$live_auction_countdown_timer_javascript .= "}";
    
   }




    $live_auction_countdown_timer_javascript .= "paused1=document.getElementById('paused').innerHTML;";
   //  $live_auction_countdown_timer_javascript .= "alert(paused1);";
$live_auction_countdown_timer_javascript .= "  setTimeout(\"CountdownTimer$ii(currenttime$ii$ii,timecount$ii$ii$ii";
   if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
$live_auction_countdown_timer_javascript .= ", buttoncount$ii$ii$ii";
            }

$live_auction_countdown_timer_javascript .= ")\", 1000); ";


        
$live_auction_countdown_timer_javascript .= "if(high_bid$ii != undefined) {";

$live_auction_countdown_timer_javascript .= "if( paused1 != 1 ) {  ";

$live_auction_countdown_timer_javascript .= "   TimeFormatter(gsecs, \"countdown$ii\", reserve_price$ii$ii$ii$ii$ii, high_bid$ii, notimer$ii ); ";

$live_auction_countdown_timer_javascript .= "}";

$live_auction_countdown_timer_javascript .= "if( paused1 == 1 ) { ";
                                        if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
$live_auction_countdown_timer_javascript .= "document.getElementById('iibb$ii').onclick=\" \";";    
                                        }
$live_auction_countdown_timer_javascript .= "document.getElementById('countdown$ii').innerHTML=\"<BR><font color=red>$PAUSED</font>\";";
    // $live_auction_countdown_timer_javascript .= "alert('$currenthour');";
 $live_auction_countdown_timer_javascript .= "}";
 
$live_auction_countdown_timer_javascript .= "}";
                 /*
$live_auction_countdown_timer_javascript .= "if(high_bid$ii == undefined) {";

$live_auction_countdown_timer_javascript .= "  document.getElementById('retail$ii').innerHTML = \" \";";

$live_auction_countdown_timer_javascript .= "  document.getElementById('highbid$ii').innerHTML = \" \";";   

$live_auction_countdown_timer_javascript .= "  document.getElementById('highbidder$ii').innerHTML = \" \";";

$live_auction_countdown_timer_javascript .= "document.getElementById('href$ii').innerHTML=\" \";";

$live_auction_countdown_timer_javascript .= "document.getElementById('countdown$ii').innerHTML = \" \"; ";

$live_auction_countdown_timer_javascript .= "document['itembidbutton$ii'].src =\"images/blank.gif\";";

$live_auction_countdown_timer_javascript .= "document['item_pic$ii'].src =\"images/blank.gif\";";

$live_auction_countdown_timer_javascript .= "}";

*/

$live_auction_countdown_timer_javascript .= "  }\r setTimeout(\"CountdownTimer$ii(currenttime$ii$ii$ii,timecount$ii";
 
 if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
$live_auction_countdown_timer_javascript .= ",buttoncount$ii";
    }
    
$live_auction_countdown_timer_javascript .= ")\", 3000); \r";
 

$i++;



}

//echo $live_auction_countdown_timer_javascript;

 
$i=0;
$ii=0;

$upcoming_auction_countdown_timer_javascript = "";


while($i < $num_auction1) {

$ii++;



$upcoming_auction_countdown_timer_javascript .= "function HoldingCountdownTimer$ii(acurrenttime$ii) {";

//$counter .= "acurrenttime$ii = new Date(acurrenttime$ii);";

//$upcoming_auction_countdown_timer_javascript .= "alert(currenttime1);";

$upcoming_auction_countdown_timer_javascript .= "if(holdingopen$ii$ii == 2) {";
$upcoming_auction_countdown_timer_javascript .= "asecondsnow$ii = acurrenttime$ii.getSeconds();";

//$upcoming_auction_countdown_timer_javascript .= "alert(secondsnow);";

$upcoming_auction_countdown_timer_javascript .= "acurrenttime$ii$ii = acurrenttime$ii;";

$upcoming_auction_countdown_timer_javascript .= "asecondslater$ii = asecondsnow$ii + 1;";

//$upcoming_auction_countdown_timer_javascript .= "alert(secondslater);";

$upcoming_auction_countdown_timer_javascript .= "acurrenttime$ii$ii.setSeconds(asecondslater$ii);";

//$upcoming_auction_countdown_timer_javascript .= "alert(currenttime2);";



//$upcoming_auction_countdown_timer_javascript .= "alert(starts$ii$ii);";
$upcoming_auction_countdown_timer_javascript .= " var dthen1 = new Date(holdingstarts$ii$ii);"; 
//$upcoming_auction_countdown_timer_javascript .= "alert(dthen1);";
$upcoming_auction_countdown_timer_javascript .= " var dnow1 = acurrenttime$ii$ii;";
//$upcoming_auction_countdown_timer_javascript .= "alert(dnow1);";
$upcoming_auction_countdown_timer_javascript .= " dddifff = new Date(dthen1-dnow1);"; 
$upcoming_auction_countdown_timer_javascript .= " gsecs2 = Math.floor(dddifff.valueOf()/1000); ";
 //   $upcoming_auction_countdown_timer_javascript .= "alert(gsecs2);";
 //$upcoming_auction_countdown_timer_javascript .= "alert(dddifff);";
$upcoming_auction_countdown_timer_javascript .= "if(holdingtitle$ii$ii != undefined) {";
$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_retail$ii').innerHTML = \"$RETAIL_PRICE:<BR> $\"+ holdingrretail$ii$ii +\"\";";    




$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').innerHTML=\"\" + holdingtitle$ii$ii +\"\";";



$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii').href=\"item.php?id=\"+ holdingid$ii$ii +\"\";";



$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').href=\"item.php?id=\"+ holdingid$ii$ii +\"\";";
$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_opens$ii').innerHTML=\"$AUCTION_STARTS_IN: \";";  

$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_retail$ii').innerHTML = \"$RETAIL_PRICE:<BR> $currency_symbol\"+ holdingrretail$ii$ii +\"\";"; 
          
  
$upcoming_auction_countdown_timer_javascript .= "document['holding_item_pic$ii'].src =\"uploaded/\" + holdingpicture_url$ii$ii + \"\";";
      //$upcoming_auction_countdown_timer_javascript .= "alert(picture_url$ii$ii);";        
                         
$upcoming_auction_countdown_timer_javascript .= "holdingretail$ii$ii$ii = holdingrretail$ii$ii;";
                      $upcoming_auction_countdown_timer_javascript .= "}";          
//$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii').innerHTML=\"<img src=uploaded/\" + picture_url$ii$ii +\" border=0>\";";

   
$upcoming_auction_countdown_timer_javascript .= "if(gsecs2 > -1 ) {";

$upcoming_auction_countdown_timer_javascript .= "   HoldingTimeFormatter(gsecs2, \"holding_countdown$ii\"); ";
$upcoming_auction_countdown_timer_javascript .= "}";
$upcoming_auction_countdown_timer_javascript .= "}";


   /*
$upcoming_auction_countdown_timer_javascript .= "if(title$ii$ii == undefined) {";

$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_retail$ii').innerHTML = \" \";";

//$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_title$ii').innerHTML = \" \";";                 

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii').innerHTML=\" \";";

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').innerHTML=\" \";";

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii').href=\" \";";

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').href=\" \";";

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_countdown$ii').innerHTML=\" \";";  

$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_opens$ii').innerHTML=\" \";";  


//$upcoming_auction_countdown_timer_javascript .= "document['holding_item_pic$ii'].src =\"images/blank.gif\";";

$upcoming_auction_countdown_timer_javascript .= "}";

          */


$upcoming_auction_countdown_timer_javascript .= "if(holdingopen$ii$ii == 1) {";

$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_retail$ii').innerHTML = \"Retail Price:<BR> $\"+ holdingrretail$ii$ii$ii +\"\";";    




$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').innerHTML=\"\"+ holdingtitle$ii$ii +\"\";";



$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii').href=\"item.php?id=\"+ holdingid$ii$ii + \"\";";



$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_href$ii$ii').href=\"item.php?id=\"+ holdingid$ii$ii + \"\";";


//$upcoming_auction_countdown_timer_javascript .= "document['holding_item_pic$ii'].src =\"uploaded/\" + picture_url$ii$ii + \"\";";
$upcoming_auction_countdown_timer_javascript .= "document.getElementById('holding_opens$ii').innerHTML=\"Auction Starts In: \";";  

$upcoming_auction_countdown_timer_javascript .= "  document.getElementById('holding_countdown$ii').innerHTML = \"<font color=red>NOW OPEN!</font>\";";  

$upcoming_auction_countdown_timer_javascript .= " }";


$upcoming_auction_countdown_timer_javascript .= "  setTimeout(\"HoldingCountdownTimer$ii(acurrenttime$ii$ii)\", 1000); ";



$upcoming_auction_countdown_timer_javascript .= " }\r setTimeout(\"HoldingCountdownTimer$ii(holdingcurrenttime$ii$ii$ii$ii)\", 3000); \r ";




$i++;

   

}

//echo $upcoming_auction_countdown_timer_javascript;

 
    
 
 
  






$i=0;
$ii=0;
$body_tag_onload_start = "<body ";
 //   $body_tag_onload_start .= " onload='";
 
if ($num_auction || $num_auction1){


}
while($i < $num_auction) {
           
$i++;
$ii++;

//$body_tag_onload_live .= "CountdownTimer$i(currenttime$i$i$i); ";

}

$i=0;
$ii=0;
while($i < $num_auction1) {
           
$i++;
$ii++;

//$body_tag_onload_upcoming .= "HoldingCountdownTimer$i(currenttime$i$i$i$i); ";

}

//$body_tag_onload_end .= " '>";
  $body_tag_onload_end .= " >";
//echo $body_tag_onload; 

           

//include ("header_nav2.html");

    


//require("./header2.php");



      

/* <!-- This Code Is Hidden

<TABLE width=98% align=center border=0 BGCOLOR=>
<TR>
<TD align=center>


<FIELDSET><LEGEND>

<FONT COLOR=#3c5a00 size=+3><B>Live Auctions</B></FONT>


</LEGEND>

-->   



<!------ READ READ READ READ READ READ READ ------->
<!-- TO MAKE CHANGES TO THE LIVE AUCTIONS LOOK ---->
<!-- CHANGE BOTH OF THE GLOBAL CSS FILES----------->
<!-- ALSO YOU CAN CHANGE THE HEADER TEXT ---------->
<!-- includes/live_and_upcoming_auction.inc.php --->
                     */
  
    /*
     
  if($_SESSION["PHPAUCTION_LOGGED_IN"]) {

    $id2 = $_SESSION["PHPAUCTION_LOGGED_IN"];
  
$query22 = mysql_fetch_array(mysql_query("SELECT bids_remaining FROM PHPAUCTIONXL_users WHERE id=$id2 ")); 

$logged_in_header = "<DIV class=LOGIN_11 >";
$logged_in_header .= "Hello";
$logged_in_header .= "&nbsp;";
$logged_in_header .= $_SESSION['PHPAUCTION_LOGGED_IN_USERNAME'];
$logged_in_header .= " You Have";
$logged_in_header .= "</DIV>";    
$logged_in_header .= "<DIV class=LOGIN_21>";        
$logged_in_header .= "<DIV class=BIDS_REMAINING_BOX1 id=\"BIDSID2\">"; 
  

  
  
$logged_in_header .= $query22['bids_remaining'];
$logged_in_header .= "</DIV>";
$logged_in_header .= "<DIV class=BIDS_LEFT_TEXT1 >";             
$logged_in_header .= "Bids Left.";
$logged_in_header .= "</DIV></DIV>";           

   }  
       
   if(!$_SESSION["PHPAUCTION_LOGGED_IN"]) {



$logged_in_header = "<DIV class=LOGIN_11 >";
$logged_in_header .= "</DIV>";    
$logged_in_header .= "<DIV class=LOGIN_21>";        
$logged_in_header .= "<DIV class=BIDS_LEFT_TEXT1 >";             
$logged_in_header .= "</DIV></DIV>";           

   }      
       
                */     
                     
$live_auction_header_html ="
<div class=LIVE_AUCTIONS_BOX_ON > 
<div class=LIVE_AUCTIONS_BOX_TOP id=liveauctionheader >
<div class=TITLE_BAR_TEXT >


$MSG_25_0057

</div> 
</div>

   <div class=LIVE_AUCTION_NOTE  >
   $live_auction_note1

</div>


";

  
//  include "themes/default/live_auction_news_box.html";  



// echo $live_auction_header_html;
         
         if ($_SESSION["PHPAUCTION_LOGGED_IN"]>0)   {
         
  $id2bidremain = $_SESSION["PHPAUCTION_LOGGED_IN"];
  
  $querybidsrem = mysql_fetch_array(mysql_query("SELECT bids_remaining FROM PHPAUCTIONXL_users WHERE id=$id2bidremain "));
  
   $bidsremaining222 = $querybidsrem['bids_remaining'];
                      }

/* get ending soon auctions */
$query = "select ends,id,title,current_high_bidder,current_bid,pict_url,promotion,ends2,allow_autobidder,notimer from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
         $query .= "starts<=".$NOW."
         order by ends2 LIMIT ".$live_start_limit.",".$live_stop_limit;
$result = mysql_query($query);
$num_auction = mysql_num_rows($result);


$i = 0;
$ii = 0;
$iii = 3;
$live_auction_boxes_html = "";

while($ii < $num_auction) {
         
   $title 	= mysql_result($result,$i,"title");
	$id 	= mysql_result($result,$i,"id");
	$ends 	= mysql_result($result,$i,"ends");
  $high_bidder 	= mysql_result($result,$i,"current_high_bidder");
	$high_bid 	= mysql_result($result,$i,"current_bid");
	$picture_url = mysql_result($result,$i,"pict_url");      
   $promotion = mysql_result($result,$i,"promotion");       
   $allow_autobidder = mysql_result($result,$i,"allow_autobidder");      
        $notimer = mysql_result($result,$i,"notimer");    
$i++;

    

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_ACTIVEBOXIPHONE\" >\r";


$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_ACTIVEBOX\" id=\"box$i\">\r";

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_TITLE\">\r";

$live_auction_boxes_html .= "  <a href=\"item.php?id=$id\" id=\"href$i\">\r";

$live_auction_boxes_html .= " $title   </a></div>\r";

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_RETAIL_PRICE\" id=\"retail$i\">\r";

$live_auction_boxes_html .= "--------\r";

//$live_auction_boxes_html .= "<p id=\"retail$i\">  </p>\r";

$live_auction_boxes_html .= "</div>\r";

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_ITEMPIC\">\r"; 
  
//$live_auction_boxes_html .= "<p id=\"item_pic$i$i\" >\r";
 
$live_auction_boxes_html .= "  <a href=\"item.php?id=$id\" id=\"href$i$i$iii\">\r";

$live_auction_boxes_html .= "  <img src='uploaded/$picture_url' 	alt='$AUCTION_ITEM' border='0' name=\"item_pic$i$iii\" width=130px>\r";  
 
//$live_auction_boxes_html .= "    </a></p></div>\r";

$live_auction_boxes_html .= "    </a></div>\r";

if ( $notimer == 0 ) {
$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_COUNTDOWN\" id=\"countdown$i\"><font size=-1 ><BR>$SYNCING_TO_SERVER</font>\r";
                      }


if ( $notimer == 1 ) {
$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_COUNTDOWN\" style=\"display:none;\" id=\"countdown$i\"><font size=-1 ><BR>$SYNCING_TO_SERVER</font></div>\r";
$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_COUNTDOWN\">\r";
}

///$live_auction_boxes_html .= "<p id=\"countdown$i\"> 00:00:00 </p>\r";

$live_auction_boxes_html .= "</div>\r";

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_HIGHBID\" id=\"highbid$i\">\r";

//$live_auction_boxes_html .= "<p id=\"highbid$i\">\r";

//$live_auction_boxes_html .= "$high_bid  </p>\r";
    $live_auction_boxes_html .= $currency_symbol;
  $live_auction_boxes_html .= print_money_nosymbol($high_bid);
  
   $live_auction_boxes_html .=  "\r";

$live_auction_boxes_html .= "</div>\r";

$live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_HIGHBIDDER\" id=\"highbidder$i\">\r";

//$live_auction_boxes_html .= "<p id=\"highbidder$i\"> $high_bidder </p>\r";

$live_auction_boxes_html .= "$high_bidder </div>\r";


      if($_SESSION["PHPAUCTION_LOGGED_IN"]) {
          	/* user is logged in, give link to edit data or log out */
	 
        $live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_BIDBUTTON\" id=\"BIDBUTTON\">\r";
   
   $live_auction_boxes_html .=     "<A ONMOUSEOVER=\"button('itembidbutton$i','images/bidbutton4$USERLANG.jpg'); this.style.cursor='pointer'\" ONCLICK=\"frontpagebid('buttonitemid$i','buttonboxid$i')\""; 
                              
$live_auction_boxes_html .= "ONMOUSEOUT=\"button('itembidbutton$i','images/bidbutton1$USERLANG.jpg')\" ID=\"iibb$i\"> ";

$live_auction_boxes_html .= "<IMG  SRC=\"images/bidbutton1$USERLANG.jpg\" NAME=\"itembidbutton$i\" ID=\"itembidbutton$i\" BORDER=0 ALT='Bid Button'></A>";

 $live_auction_boxes_html .= "<DIV style=\"display:none;\" id=\"buttonitemid$i\" ></div>";
 
  $live_auction_boxes_html .= "<DIV style=\"display:none;\" id=\"buttonboxid$i\" >itembidbutton$i</div>"; 
 
       
 } else {
           
    
                  $live_auction_boxes_html .= "<div class=\"LIVE_AUCTION_BIDBUTTON\" id=\"BIDBUTTON\">\r";
   
   $live_auction_boxes_html .=     "<A href=\"user_loginphone.php\" id=\"href$i$i$i\" ONMOUSEOVER=\"button('itembidbutton$i','images/bidbutton2$USERLANG.jpg'); this.style.cursor='pointer'\""; 
                              
    

$live_auction_boxes_html .= "ONMOUSEOUT=\"button('itembidbutton$i','images/bidbutton1$USERLANG.jpg')\" ID=\"iibb$i\"> ";

$live_auction_boxes_html .= "<IMG  SRC=\"images/bidbutton1$USERLANG.jpg\" NAME=\"itembidbutton$i\" ID=\"itembidbutton$i\" BORDER=0 ALT='Bid Button'></A>";

 $live_auction_boxes_html .= "<DIV style=\"display:none;\" id=\"buttonitemid$i\" ></div>";
 
  $live_auction_boxes_html .= "<DIV style=\"display:none;\" id=\"buttonboxid$i\" >itembidbutton$i</div>";

  }


//$live_auction_boxes_html .= "  <a href=item.php?id=$id id=\"href$i$i$i\" onmouseover=\"button('bidbutton$i','images/bidbutton2.jpg')\" 
//onmouseout=\"button('bidbutton$i','images/bidbutton1.jpg')\"> \r";

//$live_auction_boxes_html .= "<img  src=\"images/bidbutton1.jpg\" id=\"bidbutton$i\" border=0 alt='Bid Button'>\r";

//$live_auction_boxes_html .= "    </a>\r";

       $live_auction_boxes_html .= "</div>\r";





$live_auction_boxes_html .= "<div class=\"PROMO\" style=\"background: url('images/$promotion') no-repeat;\" >\r";
    
$live_auction_boxes_html .= "</div>\r";

$live_auction_boxes_html .= "<div class=\"TYPE\">\r";

$live_auction_boxes_html .= "</div>\r";

$live_auction_boxes_html .= "</div> \r";

              
              
                if ( $id2222 > 0 ) { 
                
$query435 = mysql_fetch_array(mysql_query("select * from PHPAUCTIONXL_proxybid
         WHERE itemid='$id' AND
         userid='$id2222'"));
  

 $maxprice = $query435['bid'];
  $maxbids = $query435['proxybidqty'];
                
          
                    
               }
               if ( $activatedcheck == 1 )  {      
         
               
               
           if ( $allow_autobidder == 1 )  {  
               
                           
 $live_auction_boxes_html .= "<FORM NAME=conf ACTION=\"$SETTINGS[siteurl]autobidderphone.php\" METHOD=POST>
<DIV CLASS=\"ITEM_AUTOBIDDER_BOX\" >
      
<DIV CLASS=\"ITEM_AUTOBIDDER_TITLE_TEXT1\" >
Autobidder

       <div class=\"EDITDATA3\">
       
   <DIV CLASS=\"ITEM_AUTOBIDDER_MAXPRICE_TEXT\">
     $ITEM_PAGE_AUTOBIDDER_MAX_PRICE_TEXT
         </DIV>
       
      <DIV CLASS=\"ITEM_AUTOBIDDER_MAXPRICE_INPUT\">
 <input type=text class=EDITDATA44 name=maxprice size=4 maxlength=8 value=\"$maxprice\" />
        </DIV>
  
        <DIV CLASS=\"ITEM_AUTOBIDDER_MAXBIDS_TEXT\">
   $ITEM_PAGE_AUTOBIDDER_MAX_BIDS_TEXT
    </DIV>
      <DIV CLASS=\"ITEM_AUTOBIDDER_MAXBIDS_INPUT\">
 <input type=text class=EDITDATA44 name=maxbids size=4 maxlength=8 value=\"$maxbids\" />
        </DIV>
             <DIV CLASS=\"ITEM_AUTOBIDDER_BUTTON\">
<input type=submit name=\"\" value=\"$UPDATE\" class=button  />
          </DIV>
   
   </DIV>
  </DIV>
          
          
          
                 <input type=hidden class=EDITDATA44 name=userid size=4 maxlength=8 value=\"$id2222\" />
                 <input type=hidden class=EDITDATA44 name=itemid size=4 maxlength=8 value=\"$id\" />
                 <input type=hidden class=EDITDATA44 name=update_autobidder size=4 maxlength=8 value=\"1\" />
     </form>
    
    
 
        ";
            
            
            
             $live_auction_boxes_html .= "</div>\r";
             
              }
              
                  if ( $allow_autobidder == 0 )  {  
               
                           
 $live_auction_boxes_html .= "
<DIV CLASS=\"ITEM_AUTOBIDDER_BOX\" style=\"border-width:0px; background-color:transparent;\">
    
        ";
             $live_auction_boxes_html .= "</div>\r";
             
              }       
              
              }
              
             
      if ( $id2222 > 0 ) { 
              
          if ( $ii == 0 ) {  
             
       $live_auction_boxes_html .= "               <DIV class=BIDS_REMAINING_BOX id=\"BIDSID\"> 
  
          $bidsremaining222
  </DIV>
    
               <DIV class=BIDS_LEFT_TEXT >             
              
       $BIDS_LEFT
              
              </DIV> 
           <DIV class=BIDS_LEFT_TEXT2 >     
              <a href=\"$SETTINGS[siteurl]buybids.php\" >Buy Bids</A>
               </DIV>
               ";
               
                    }
                    
                    
                     if ( $ii > 0 ) {  
          $live_auction_boxes_html .= "     
             
             <script type=\"text/javascript\" language=\"Javascript\">
             
             function bidsidupdate$id(){
             
            var BIDSID$id=document.getElementById('BIDSID').innerHTML;
             
                  document.getElementById('BIDSID99$id').innerHTML=BIDSID$id;
             
             
                                        }
             
                         setInterval(\"bidsidupdate$id()\", 1000);
             
                           </script>
                           
                    <DIV class=BIDS_REMAINING_BOX id=\"BIDSID99$id\"> 
  
          $bidsremaining222
  </DIV>
    
               <DIV class=BIDS_LEFT_TEXT >             
              
       $BIDS_LEFT
              
              </DIV> 
           <DIV class=BIDS_LEFT_TEXT2 >     
              <a href=\"$SETTINGS[siteurl]buybids.php\" >Buy Bids</A>
               </DIV>
               ";
               
                    }    
                      }
               
           $live_auction_boxes_html .= "</div>\r";
             
$ii++;

         }
  
//  echo $live_auction_boxes_html;
  

  
$live_auction_bottom_html = "  
    <div class=PAGE_PAGINATION_BOX_ON >  $pagination_live </div>
</div>   
<div class=LIVE_AUCTIONS_BOX_BOTTOM id=liveauctionbottom>
</div> <DIV style=\"display:none\" id=\"paused\">$paused</DIV>
    <DIV style=\"display:none\" id=\"days_language\">$MSG_377</DIV>
        <DIV style=\"display:none\" id=\"takingachance_language\">$taking_a_chance</DIV>
    <DIV style=\"display:none\" id=\"notsold_language\">$MSG_NOTSOLD</DIV>
     <DIV style=\"display:none\" id=\"sold_language\">$MSG_SOLD</DIV>
      <DIV style=\"display:none\" id=\"reserve_language\">$MSG_RESERVENOTMET</DIV>
          <DIV style=\"display:none\" id=\"goingonce_language\">$MSG_GOINGONCE</DIV>               
           <DIV style=\"display:none\" id=\"goingtwice_language\">$MSG_GOINGTWICE</DIV>
     <DIV style=\"display:none\" id=\"finalcall_language\">$MSG_FINALCALL</DIV>
     <DIV style=\"display:none\" id=\"nowopen_language\">$MSG_NOWOPEN</DIV>
     <DIV style=\"display:none\" id=\"go_language\">$MSG_GO</DIV>
      <DIV style=\"display:none\" id=\"getset_language\">$MSG_GETSET</DIV>
      <DIV style=\"display:none\" id=\"onyourmark_language\">$MSG_ONYOURMARK</DIV>
        <DIV style=\"display:none\" id=\"elite_limit_language\">$MSG_ELITE_WIN_LIMIT</DIV>
      <DIV style=\"display:none\" id=\"beginning_limit_language\">$MSG_BEGINNER_WIN_LIMIT</DIV>
      <DIV style=\"display:none\" id=\"daily_limit_language\">$MSG_WIN_LIMIT_DAILY_POPUP_NOTE</DIV>
      <DIV style=\"display:none\" id=\"weekly_limit_language\">$MSG_WIN_LIMIT_WEEKLY_POPUP_NOTE</DIV>
      <DIV style=\"display:none\" id=\"monthly_limit_language\">$MSG_WIN_LIMIT_MONTHLY_POPUP_NOTE</DIV>
      <DIV style=\"display:none\" id=\"bidbutton5frontdiv\">images/bidbutton5$USERLANG.jpg</DIV>
            <DIV style=\"display:none\" id=\"seatsfull_language\">$MSG_SEATS_FULL</DIV>
      <DIV style=\"display:none\" id=\"lockout_language\">$MSG_LOCKOUT</DIV>
                  <DIV style=\"display:none\" id=\"zero_bid_notice\">$ZERO_BID_NOTICE</DIV>
      <DIV style=\"display:none\" id=\"auction_payment_notice\">$PLEASE_PAY</DIV>
        ";
      
// <!-- This Code Is Hidden </FIELDSET> </TD> </TR> </TABLE> -->
  

//  echo $live_auction_bottom_html;
  
  

/* <!-- This Code Is Hidden

<TABLE width=98% align=center border=0 BGCOLOR=>
<TR>
<TD align=center>


<FIELDSET><LEGEND>

<FONT COLOR=#3c5a00 size=+3><B>Upcoming Auctions</B></FONT>


</LEGEND>

--> 



  
<!------ READ READ READ READ READ READ READ ------->
<!-- TO MAKE CHANGES TO THE UPCOMING AUCTIONS LOOK ---->
<!-- CHANGE BOTH OF THE GLOBAL CSS FILES----------->
<!-- ALSO YOU CAN CHANGE THE HEADER TEXT ---------->
<!-- includes/live_and_upcoming_auction.inc.php --->
  
  
     */
         
    $upcoming_auction_header_html = " 
  
 <div class=UPCOMING_AUCTIONS_BOX_ON > 
<div class=UPCOMING_AUCTIONS_BOX_TOP id=upcomingauctionheader >
 <div class=TITLE_BAR_TEXT>
$MSG_AJAX_ADMIN_GRAPHIC_INTERFACE_UPCOMING
  </div>


</div>

     <div class=UPCOMING_AUCTION_NOTE >
  $upcoming_auction_note1

</div>
  
 "; 
  
  
//  echo $upcoming_auction_header_html;




$query = "select retail,starts,id,title,current_high_bidder,current_bid,pict_url from PHPAUCTIONXL_auctions
         WHERE closed='0' AND
         suspended='0' AND ";
$query .= "starts>=".$NOW."
         ORDER BY starts ASC
         LIMIT ".$upcoming_start_limit.",".$upcoming_stop_limit;
 $result = mysql_query($query);
$num_auction1 = mysql_num_rows($result);


$ii = 0;
$i = 0;
$spacer = "1";
$upcoming_auction_boxes_html = "";


while($ii < $num_auction1) {
         
   $title 	= mysql_result($result,$ii,"title");
	$id 	= mysql_result($result,$ii,"id");
	$starts 	= mysql_result($result,$ii,"starts");
$picture_url = mysql_result($result,$ii,"pict_url");      
         
  
$i++;


$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTIONS_BOX_MIDDLE\" id=\"upcomingauctioncontentmiddle\">\r";
    
    
    if ( $num_auction1  > 1 && $ii > 0 )
       {
        $hr = "<div class=UPCOMING_AUCTION_LINE ></div>";
     $upcoming_auction_boxes_html .= $hr;
       
             
       }



$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTION_ITEM_PIC\">\r"; 
  
//$upcoming_auction_boxes_html .= "<p id=\"item_pic$i$i\" >\r";
 
$upcoming_auction_boxes_html .= "  <a href=item.php?id=$id id=\"holding_href$i\">\r";

$upcoming_auction_boxes_html .= "  <img src='uploaded/$picture_url' 	alt='$AUCTION_ITEM' Border='' name=\"holding_item_pic$i\" width=130px>\r"; 
 
//$upcoming_auction_boxes_html .= "    </a></p></div>\r";

$upcoming_auction_boxes_html .= "    </a></div>\r";


$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTION_ITEM_TITLE\" id=\"holding_title$i\">\r";

$upcoming_auction_boxes_html .= "  <a href=\"item.php?id=$id\" id=\"holding_href$i$i\">\r";

$upcoming_auction_boxes_html .= " $title   </a></div>\r";


$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTION_RETAIL_PRICE\" id=\"holding_retail$i\">\r";

//$upcoming_auction_boxes_html .= "<p id=\"retail$i\">  </p>\r";

$upcoming_auction_boxes_html .= "</div>\r";



$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTION_OPENS\" id=\"holding_opens$i\">\r";

//$upcoming_auction_boxes_html .= "<p id=\"retail$i\">  </p>\r";

$upcoming_auction_boxes_html .= "</div>\r";


$upcoming_auction_boxes_html .= "<div class=\"UPCOMING_AUCTION_COUNTDOWN\" id=\"holding_countdown$i\"> \r";

$upcoming_auction_boxes_html .= "<font size=-1 >$SYNCING_TO_SERVER</font>";

$upcoming_auction_boxes_html .= "</div>\r";

$upcoming_auction_boxes_html .= "</div>\r";

       
        
 $ii++;       
 $spacer++;       
        
        
         }
  
  
 
 
 //echo $upcoming_auction_boxes_html;  


 $upcoming_auction_bottom_html = " 
  
     <div class=PAGE_PAGINATION_BOX_ON >    $pagination_upcoming </div>
 </div>
<div class=\"UPCOMING_AUCTIONS_BOX_BOTTOM\" id=\"upcomingauctionbottom\">

</div>    ";
  
 // <!-- This Code Is Hidden </FIELDSET> </TD> </TR> </TABLE> -->

 
 //echo  $upcoming_auction_bottom_html;
 
 
 
 $live_and_upcoming_auction_html = "";
 
 $live_and_upcoming_auction_html .= $live_auction_header_html;
 $live_and_upcoming_auction_html .= $live_auction_boxes_html; 
 $live_and_upcoming_auction_html .= $live_auction_bottom_html; 
 $live_and_upcoming_auction_html .= $upcoming_auction_header_html; 
 $live_and_upcoming_auction_html .= $upcoming_auction_boxes_html; 
 $live_and_upcoming_auction_html .= $upcoming_auction_bottom_html;



  $live_auction_html = "";
  $live_auction_html .= $live_auction_header_html;  
  $live_auction_html .= $live_auction_boxes_html; 
  $live_auction_html .= $live_auction_bottom_html;
                         
                         
  $upcoming_auction_html = "";
$upcoming_auction_html .= $upcoming_auction_header_html; 
$upcoming_auction_html .= $upcoming_auction_boxes_html;
$upcoming_auction_html .= $upcoming_auction_bottom_html;
                          
                         
                         
             
$live_auction_javascript = "";
$live_auction_javascript .= $header_data_stream_javascript_live_auctions; 
$live_auction_javascript .= $live_auction_data_stream_javascript;
$live_auction_javascript .= $bottom_data_stream_javascript_live_auctions;
$live_auction_javascript .= $high_bid_set_to_x; 
$live_auction_javascript .= $live_auction_countdown_timer_javascript;                 
                         
                          
                          
   $live_and_upcoming_auction_javascript = "";
$live_and_upcoming_auction_javascript .= $header_data_stream_javascript_live_auctions; 
$live_and_upcoming_auction_javascript .= $live_auction_data_stream_javascript;
$live_and_upcoming_auction_javascript .= $bottom_data_stream_javascript_live_auctions;
$live_and_upcoming_auction_javascript .= $header_data_stream_javascript_upcoming_auctions;
$live_and_upcoming_auction_javascript .= $upcoming_auction_data_stream_javascript; 
$live_and_upcoming_auction_javascript .= $bottom_data_stream_javascript_upcoming_auctions;
$live_and_upcoming_auction_javascript .= $high_bid_set_to_x; 
$live_and_upcoming_auction_javascript .= $live_auction_countdown_timer_javascript; 
$live_and_upcoming_auction_javascript .= $upcoming_auction_countdown_timer_javascript; 



$upcoming_auction_javascript = "";
$upcoming_auction_javascript .= $header_data_stream_javascript_upcoming_auctions; 
$upcoming_auction_javascript .= $upcoming_auction_data_stream_javascript; 
$upcoming_auction_javascript .= $bottom_data_stream_javascript_upcoming_auctions;
$upcoming_auction_javascript .= $upcoming_auction_countdown_timer_javascript; 



                 
$body_tag_onload_live2 = $body_tag_onload_start;
$body_tag_onload_live2 .= $body_tag_onload_live;
$body_tag_onload_live2 .= $body_tag_onload_end;



$body_tag_onload = $body_tag_onload_start;
$body_tag_onload .= $body_tag_onload_live;
       $body_tag_onload .= $body_tag_onload_upcoming;

$body_tag_onload .= $body_tag_onload_end;


 $body_tag_onload_upcoming2 = $body_tag_onload_start;
        $body_tag_onload_upcoming2 .= $body_tag_onload_upcoming;

$body_tag_onload_upcoming2 .= $body_tag_onload_end;




  // require("index_test5.html");
      
         //   require("./footer.php");
            
            
            
       ?> 